<TITLE>Language -- /Project</TITLE>
<NEXTID 7>
<H1>Language features</H1>Code to be common shared code must (unfortunately!) be written in
C, rather than any objective C or C++, to ensure maximum portability.
This section does not apply to code written for specific platforms.<P>
C code must compile under either a conforming ANSI C compiler OR an
original Kernighan & Ritchie C compiler. Therefore, the __STDC__ macro
must be used to select alternative code where necessary.. (<A NAME=1 HREF=Ex_Heading.html> example</A>
)<P>
Code should compile without warnings under an ANSI C compiler such
as gcc with all warnings enabled.
<DL>
<DT>Parameters and Arguments
<DD> The <A NAME=3 HREF=Macros.html#1>PARAMS(()) macro</A>  is used to give a format
parameter list in a declataion so that it will be suppressed if the
compiler is not standard C - see <A NAME=4 HREF=Ex_Heading.html>example</A> ..  The ARGS1 macro is for
the declaration of the implementation,  taking first the type then
the argument name. For n arguments, macros <A NAME=5 HREF=Macros.html#9>ARGn</A> exists taking 2n arguments
each.
<DT>#endif
<DD> Do put the ending condition in a comment. Don't put  it as
code - it won't pass all compilers. 
<DT>#elif
<DD>Don't use it. Basic cpp doesn't know it.
<DT>#preprocessor statements
<DD> DON'T indent any preprocessor statements.
They must (for some compilers) begin in column 1.
<DT>const
<DD> This keyword does not exist in K&R C, so use the macro <A NAME=6 HREF=Macros.html#10>CONST</A>
which expands to "const" under standard C and nothing otherwise. --
See HTUtils.h
</DL>
(part of: <A NAME=2 HREF=Coding.html>style guide</A> ) _________________________________________________________________
<ADDRESS><A NAME=0 HREF=http://info.cern.ch./hypertext/TBL_Disclaimer.html>Tim BL</A></A>
</ADDRESS>